package com.music.common.entity;

import java.io.Serializable;
import java.util.Locale;
import java.util.TimeZone;

import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import javax.servlet.http.HttpSessionEvent;


/**
 * A session object used to store details of a logged in user Copyright (c) 2002 BuildOnline. All Rights
 * Reserved.
 */
public class UserSettings implements Serializable, HttpSessionBindingListener, HttpSessionActivationListener {

    // if you make changes to this class that would make it incompatiable
    // with previously serialized versions then you should update this value
    private static final long    serialVersionUID     = 1L;

    private static final Integer DEFAULT_BATCH_SIZE   = new Integer(15);

    private String               system               = null;

    private String               runMode;

    private String              userId;

    private String              userType;

    private String               loginName;

    private String               firstName;

    private String               lastName;

    private String               email;

    private Integer              resultBatchSizeValue = DEFAULT_BATCH_SIZE;

    private boolean              isCompanyAdministrator;

    private String               languageCode;

    private TimeZone             timeZone;

    private Locale               locale;

    private Integer              sessionTimeoutMins;

    private boolean				 isUserSessionActive;
    /**
     * Default constructor
     */
    public UserSettings() {
        runMode = "live";
    }

	/**
	 * @return the runMode
	 */
	public String getRunMode() {
		return runMode;
	}

	/**
	 * @param runMode the runMode to set
	 */
	public void setRunMode(String runMode) {
		this.runMode = runMode;
	}

	/**
	 * @return the system
	 */
	public String getSystem() {
		return system;
	}

	/**
	 * @param system the system to set
	 */
	public void setSystem(String system) {
		this.system = system;
	}

	/**
	 * @return the userId
	 */
	public String getUserId() {
		return userId;
	}

	/**
	 * @param userId the userId to set
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * @return the userType
	 */
	public String getUserType() {
		return userType;
	}

	/**
	 * @param userType the userType to set
	 */
	public void setUserType(String userType) {
		this.userType = userType;
	}

	/**
	 * @return the loginName
	 */
	public String getLoginName() {
		return loginName;
	}

	/**
	 * @param loginName the loginName to set
	 */
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	/**
	 * @return the firstName
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @param firstName the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @return the lastName
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * @param lastName the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the resultBatchSizeValue
	 */
	public Integer getResultBatchSizeValue() {
		return resultBatchSizeValue;
	}

	/**
	 * @param resultBatchSizeValue the resultBatchSizeValue to set
	 */
	public void setResultBatchSizeValue(Integer resultBatchSizeValue) {
		this.resultBatchSizeValue = resultBatchSizeValue;
	}

	/**
	 * @return the isCompanyAdministrator
	 */
	public boolean isCompanyAdministrator() {
		return isCompanyAdministrator;
	}

	/**
	 * @param isCompanyAdministrator the isCompanyAdministrator to set
	 */
	public void setCompanyAdministrator(boolean isCompanyAdministrator) {
		this.isCompanyAdministrator = isCompanyAdministrator;
	}

	/**
	 * @return the languageCode
	 */
	public String getLanguageCode() {
		return languageCode;
	}

	/**
	 * @param languageCode the languageCode to set
	 */
	public void setLanguageCode(String languageCode) {
		this.languageCode = languageCode;
	}

	/**
	 * @return the timeZone
	 */
	public TimeZone getTimeZone() {
		return timeZone;
	}

	/**
	 * @param timeZone the timeZone to set
	 */
	public void setTimeZone(TimeZone timeZone) {
		this.timeZone = timeZone;
	}

	/**
	 * @return the locale
	 */
	public Locale getLocale() {
		return locale;
	}

	/**
	 * @param locale the locale to set
	 */
	public void setLocale(Locale locale) {
		this.locale = locale;
	}

	/**
	 * @return the sessionTimeoutMins
	 */
	public Integer getSessionTimeoutMins() {
		return sessionTimeoutMins;
	}

	/**
	 * @param sessionTimeoutMins the sessionTimeoutMins to set
	 */
	public void setSessionTimeoutMins(Integer sessionTimeoutMins) {
		this.sessionTimeoutMins = sessionTimeoutMins;
	}

	@Override
	public void valueBound(HttpSessionBindingEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void valueUnbound(HttpSessionBindingEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void sessionDidActivate(HttpSessionEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void sessionWillPassivate(HttpSessionEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	/**
	 * @return the isUserSessionActive
	 */
	public boolean isUserSessionActive() {
		return isUserSessionActive;
	}

	/**
	 * @param isUserSessionActive the isUserSessionActive to set
	 */
	public void setUserSessionActive(boolean isUserSessionActive) {
		this.isUserSessionActive = isUserSessionActive;
	}
}
